﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using WW.NActiveRecord.Internal;

namespace WW.NActiveRecord.Tests.StudyTest
{

    
    class TestDb
    {
       
        public void testpass()
        {
            SqlCommand command = new SqlCommand(@"
                SELECT *,
                    c.name AS column_name
                    ,c.column_id
                    ,SCHEMA_NAME(t.schema_id) AS type_schema
                    ,t.name AS type_name
                    ,t.is_user_defined
                    ,c.max_length
                    ,c.precision
                    ,c.scale
                    ,is_identity
                    ,is_computed
                    ,is_rowguidcol

                FROM sys.columns AS c 
                JOIN sys.types AS t ON c.user_type_id=t.user_type_id
                WHERE c.object_id = OBJECT_ID(@tableName)
                ORDER BY c.column_id;
            ");
            command.Parameters.AddWithValue("@tableName", "Customers");
            Debug2.Print(TestEnvironment.db.ExecuteQuery(command));
        }
         
    }
}
